package jschtest;

import io.SshBean;
import java.util.concurrent.ThreadPoolExecutor;

public class JschTest {

//    public static void main(String[] args){
//        ThreadPoolExecutor executor = ThreadPoolUtil.getInstance();
//        String src1 = "D:\\data\\home\\mysql-5.7.26-winx64.zip"; // 本地文件名
//        String src2 = "D:\\code\\test.sh"; // 本地文件名
////        String src = "/home/jsch/code.zip"; // 本地文件名
//        String dst = "/home/jsch/"; // 目标文件名
//
////        SshBean sshBean1 = new SshBean();
////        sshBean1.setIp("100.2.126.121");
////        sshBean1.setUsername("root");
////        sshBean1.setPassword("Inspur1!");
////        JschTool.uploadFile(sshBean1,src1,dst);
////        executor.execute(new UploadRunnable(sshBean1,src1,dst));
//        SshBean sshBean2 = new SshBean();
//        sshBean2.setIp("100.2.126.128");
//        sshBean2.setUsername("test");
//        sshBean2.setPassword("Inspur1!");
//        System.out.println(JschTool.execCommand(sshBean2,"cat /usr/local/isfm/bin/iboot-restart.sh"));
////        executor.execute(new UploadRunnable(sshBean2,src1,dst));
////        SshBean sshBean3 = new SshBean();
////        sshBean3.setIp("100.2.126.123");
////        sshBean3.setUsername("root");
////        sshBean3.setPassword("Inspur1!");
////        executor.execute(new UploadRunnable(sshBean3,src,dst));
////        SshBean sshBean4 = new SshBean();
////        sshBean4.setIp("100.2.126.124");
////        sshBean4.setUsername("root");
////        sshBean4.setPassword("123456a?");
////        executor.execute(new UploadRunnable(sshBean4,src,dst));
//
//    }
}
